package com.lagou.sqlSession;

import com.lagou.pojo.Configuration;

/**
 * @Title: IPersistence
 * @Description:
 * @Author: Wenfeng Cheng
 * @Date: 2020-11-28 10:25
 * @Version: 1.0.0
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        SqlSession sqlSession = new DefaultSqlSession(configuration);
        return sqlSession;
    }
}
